package com.huajin.iot.common.controller;

import com.huajin.iot.common.utils.ShiroUtils;
import com.huajin.iot.system.domain.UserDO;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class BaseController {
    public UserDO getUser() {
        return ShiroUtils.getUser();
    }

    public Long getUserId() {
        return getUser().getUserId();
    }

    public String getUsername() {
        return getUser().getUsername();
    }
}